
//let base = 'http://localhost:9696/iot-platform';
let base = 'http://116.62.198.48:8080/iot-platform';
//let base = 'http://192.168.1.100:9696/iot-platform';

export const DEFINE = {
    appName: '智慧农业',
    company: '安宁生物',
    android_version: '1.1.0',
    ios_version: '1.1.0',
    appIcon: 'assets/imgs/icon.png',
    baseURL: `${base}`
}

export const REQ_URL = {

    app:{
        getVersion:`${base}/appVersion/detail`,
        UpdateVersion:`${base}/appVersion/update`,
    },
    //用户
    user: {
        login: `${base}/login`,
        loginByToken: `${base}/loginByToken`,

        //更新push ID
        updatePushCode: `${base}/user/updatePushCode`,

        updatePassword: `${base}/user/updatePassword`,

        //通知标记
        loadNoticeFlag: `${base}/user/loadNoticeFlag`,

        //保存标记
        saveNoticeFlag: `${base}/user/saveNoticeFlag`
    },

    // 设备
    dev: {
        getList: `${base}/device/list`,
        getDetail: `${base}/device/detail`,
        updateStatus: `${base}/device/updateStatus`,
        updateGPS: `${base}/device/getGPS`,
        platformAddDevice: `${base}/device/platformAddDevice`,
        platformUpdateDevice: `${base}/device/platformUpdateDevice`
    },

    // 故障
    alarm: {
        getList: `${base}/deviceAlarm/list`,
        getDetail: `${base}/deviceAlarm/detail`,
        update:  `${base}/deviceAlarm/update`
    },

    //地域
    area: {

        // 获取地市 /params.provinceCode
        getCityList: `${base}/city/list`,

        // 获取县区 /params.cityCode
        getDistrictList: `${base}/district/list`,
    },

    //gis
    gis: {
        getList: `${base}/device/gisList`,
        getStateCount: `${base}/device/countByStatus`
    },

    //消息
    msg: {
        // 消息列表
        getList: `${base}/message/list`,

        // 消息具体
        getDetail: `${base}/message/detail`,

        // 未读消息
        unReadNum: `${base}/message/unreadNum`,

        // 标记为已读 messageId: '1' params
        markRead: `${base}/message/markRead`,

        // 清除消息
        clear: `${base}/message/clear`,

        // 清除消息messageId: '1'
        delete: `${base}/message/delete`
    },

    analysis:{
        // {"timeScale":"week","deviceId":1}
        getTemperature:  `${base}/analysis/temperature`,
        getBugRate:  `${base}/analysis/bugRate`,
        getHumidity:  `${base}/analysis/humidity`
    },

    farm:{
        getAllList:`${base}/farm/all`
    }
}
